package com.caishi.lkx.common.ienum;

import com.caishi.lkx.user.ienum.type.HaveType;

public enum PlatformType {
    VERS7(1, "vers7平台"), KAOYAN(2, "考研平台");
    final Integer code;
    final String desc;

    PlatformType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public HaveType convertHaveType() {
        return switch (this.code) {
            case 1 -> HaveType.vers7;
            case 2 -> HaveType.kaoyan;
            default -> HaveType.vers7;
        };
    }
}
